package week5;

public class week5q2 {
    public static void main(String[] args) {
        for (int i=0;i<=1000;i++){
            for (int j=2;j<i;j++){
                if(i%j==0){
                    break;
                }else if (j==i-1){
                    System.out.println(i);
                }
            }
        }
    }
}
